<?php

namespace app\api\validate;


use \think\Validate;

/**
 *  经销商商品严重类
 */
class DistributorProduct extends Validate
{
    protected $rule = [
        'page' => 'require|number',
        'listRows' => 'require|number',
        'brand' => 'require|array',
        'minableCoin' => 'require|array',
        'warehouse' => 'require|array',
        'condition' => 'require|number',
        'sort' => 'require',
    ];


    //定义验证提示
    protected $message = [
        'page.require' => 'distributor.pageRequire',
        'page.number' => 'distributor.pageNumber',
        'listRows.require' => 'distributor.listRowsRequire',
        'listRows.number' => 'distributor.listRowsNumber',
        'brand.require' => 'distributor.brandRequire',
        'brand.array' => 'distributor.brandArray',
        'minableCoin.require' => 'distributor.minableCoinRequire',
        'minableCoin.array' => 'distributor.minableCoinArray',
        'warehouse.require' => 'distributor.warehouseRequire',
        'warehouse.array' => 'distributor.warehouseArray',
        'condition.require' => 'distributor.conditionRequire',
        'condition.number' => 'distributor.conditionNumber',
        'sort.require' => 'distributor.sortRequire',
    ];

    //定义验证场景
    protected $scene = [
        'list' => ['page','listRows'],
        'save' => ['first_name','last_name','email','phone','country_id','country_name','city_id','city_name','state','zip_code','address']
    ];


}
